package day5.sss;

import java.io.Serializable;

public class Student implements Serializable {
    String id;  //学号
    String name;    //姓名
    String specialty;   //专业
    double score;   //成绩

    public Student(String id, String name, String specialty, double score) {
        this.id = id;
        this.name = name;
        this.specialty = specialty;
        this.score = score;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getSpecialty() {
        return specialty;
    }

    public void setSpecialty(String specialty) {
        this.specialty = specialty;
    }

    public double getScore() {
        return score;
    }

    public void setScore(double score) {
        this.score = score;
    }

    public Student() {
    }

    @Override
    public String toString() {
        return "姓名: " + name + "\t" + "专业: " + specialty + "\t" + "分数: " + score;
    }
}
